package com.riversoft.weixin.app.template;

import com.fasterxml.jackson.annotation.JsonProperty;

import java.util.Map;

public class UniFormSend {

    @JsonProperty("touser")
    private String toUser;

    @JsonProperty("weapp_template_msg")
    private WeappTemplateMsg weappTemplateMsg;

    @JsonProperty("mp_template_msg")
    private MpTemplateMsg mpTemplateMsg;

    public String getToUser() {
        return toUser;
    }

    public void setToUser(String toUser) {
        this.toUser = toUser;
    }

    public WeappTemplateMsg getWeappTemplateMsg() {
        return weappTemplateMsg;
    }

    public void setWeappTemplateMsg(WeappTemplateMsg weappTemplateMsg) {
        this.weappTemplateMsg = weappTemplateMsg;
    }

    public MpTemplateMsg getMpTemplateMsg() {
        return mpTemplateMsg;
    }

    public void setMpTemplateMsg(MpTemplateMsg mpTemplateMsg) {
        this.mpTemplateMsg = mpTemplateMsg;
    }


    public static class WeappTemplateMsg{
        @JsonProperty("template_id")
        private String templateId;
        private String page;
        @JsonProperty("form_id")
        private String formId;
        private Map<String, WeappTemplateMsg.Data> data;
        @JsonProperty("emphasis_keyword")
        private String highlight;



        public String getTemplateId() {
            return templateId;
        }

        public void setTemplateId(String templateId) {
            this.templateId = templateId;
        }

        public String getPage() {
            return page;
        }

        public void setPage(String page) {
            this.page = page;
        }

        public Map<String, WeappTemplateMsg.Data> getData() {
            return data;
        }

        public void setData(Map<String, WeappTemplateMsg.Data> data) {
            this.data = data;
        }

        public String getFormId() {
            return formId;
        }

        public void setFormId(String formId) {
            this.formId = formId;
        }

        public String getHighlight() {
            return highlight;
        }

        public void setHighlight(String highlight) {
            this.highlight = highlight;
        }

        /**
         * Created by exizhai on 12/16/2015.
         */
        public static  class Data {

            private String value;
            private String color;

            public Data() {
            }

            public Data(String value, String color) {
                this.value = value;
                this.color = color;
            }

            public String getValue() {
                return value;
            }

            public void setValue(String value) {
                this.value = value;
            }

            public String getColor() {
                return color;
            }

            public void setColor(String color) {
                this.color = color;
            }
        }
    }
    public static class MpTemplateMsg{

        @JsonProperty("appid")
        private String appid;
        @JsonProperty("template_id")
        private String templateId;
        private String page;
        private String url;
        private MiniProgram miniprogram;
        private Map<String, MpTemplateMsg.Data> data;


        public String getAppid() {
            return appid;
        }

        public void setAppid(String appid) {
            this.appid = appid;
        }

        public String getTemplateId() {
            return templateId;
        }

        public void setTemplateId(String templateId) {
            this.templateId = templateId;
        }

        public String getPage() {
            return page;
        }

        public void setPage(String page) {
            this.page = page;
        }

        public String getUrl() {
            return url;
        }

        public void setUrl(String url) {
            this.url = url;
        }

        public MiniProgram getMiniprogram() {
            return miniprogram;
        }

        public void setMiniprogram(MiniProgram miniprogram) {
            this.miniprogram = miniprogram;
        }

        public Map<String, MpTemplateMsg.Data> getData() {
            return data;
        }

        public void setData(Map<String,MpTemplateMsg. Data> data) {
            this.data = data;
        }
        public static class MiniProgram{
            @JsonProperty("appid")
            private String appid;
            @JsonProperty("pagepath")
            private String pagepath;
            public String getAppid() {
                return appid;
            }

            public void setAppid(String appid) {
                this.appid = appid;
            }

            public String getPagepath() {
                return pagepath;
            }

            public void setPagepath(String pagepath) {
                this.pagepath = pagepath;
            }
        }
        /**
         * Created by exizhai on 12/16/2015.
         */
        public static  class Data {

            private String value;
            private String color;

            public Data() {
            }

            public Data(String value, String color) {
                this.value = value;
                this.color = color;
            }

            public String getValue() {
                return value;
            }

            public void setValue(String value) {
                this.value = value;
            }

            public String getColor() {
                return color;
            }

            public void setColor(String color) {
                this.color = color;
            }
        }
    }

}
